CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

PROJECT( MikinolLib )

SET	(	SOURCES
		MikinolVector3.h
		MikinolCriticalSectionEnterer.h
		MikinolCriticalSectionEnterer.cpp
		MikinolCOMObjectSharedPtr.h
		MikinolCOMObjectSharedPtr.cpp
				
		MikinolMemoryBuffer.h
		MikinolMemoryBuffer.cpp
		MikinolImageFormat.h
		MikinolImageFormat.cpp
		MikinolImage.h
		MikinolImage.cpp
		MikinolImageConverter.h
		MikinolImageConverter.cpp
		
		MikinolCapturedImage.h
		MikinolCapturedImage.cpp
		MikinolCaptureSettings.h
		MikinolCaptureSettings.cpp
		MikinolSkeletonTrackingData.h
		MikinolSkeletonTrackingData.cpp
				
		MikinolColorCameraSettings.h
		MikinolColorCameraSettings.cpp
		MikinolSensorInternals.h
		MikinolSensorInternals.cpp
		MikinolSensor.h
		MikinolSensor.cpp
		
		MikinolSensorManagerInternals.h
		MikinolSensorManagerInternals.cpp
		MikinolSensorManager.h
		MikinolSensorManager.cpp
		
		MikinolFaceTrackerResult.h
		MikinolFaceTrackerResult.cpp
		MikinolFaceTrackerInternals.h
		MikinolFaceTrackerInternals.cpp
		MikinolFaceTracker.h
		MikinolFaceTracker.cpp		
	)	
	
IF( MSVC )
	# Set Unicode as character set for Visual Studio projects. By default it's Multi-Byte
	ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
			
	# Set Warning level to 4
	IF ( CMAKE_CXX_FLAGS MATCHES "/W[0-4]" )
		STRING( REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
	ELSE()
		SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4" )
   ENDIF()
ENDIF()

#
# There are environment variables for KinectSDK and the Face Tracking SDK...
# Includes:
# $(KINECTSDK10_DIR)\inc;$(FTSDK_DIR)inc
# Libs:
# $(FTSDK_DIR)Lib\x86;$(KINECTSDK10_DIR)\Lib\x86	FaceTrackLib.lib Kinect10.lib
#	

SET( KINECT_SDK_PATH "C:/Program Files/Microsoft SDKs/Kinect/v1.6" )
SET( FT_SDK_PATH "C:/Program Files/Microsoft SDKs/Kinect/Developer Toolkit v1.6.0" )

IF ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
	
	MESSAGE("Using Win64 Kinect SDK")
	
	# Kinect
	INCLUDE_DIRECTORIES( ${KINECT_SDK_PATH}/inc ) 
	SET( KINECT_SDK_LIBS_PATH ${KINECT_SDK_PATH}/lib/amd64 )

	# FaceTrackLib
	INCLUDE_DIRECTORIES( ${FT_SDK_PATH}/inc ) 
	SET( FT_SDK_LIBS_PATH ${FT_SDK_PATH}/lib/amd64 )
	
ELSE()
	
	MESSAGE("Using Win32 Windows SDK")
	
	# Kinect
	INCLUDE_DIRECTORIES( ${KINECT_SDK_PATH}/inc ) 
	SET( KINECT_SDK_LIBS_PATH ${KINECT_SDK_PATH}/lib/x86 )
	
	# FaceTrackLib
	INCLUDE_DIRECTORIES( ${FT_SDK_PATH}/inc ) 
	SET( FT_SDK_LIBS_PATH ${FT_SDK_PATH}/lib/x86 )
	
ENDIF()

ADD_LIBRARY( ${PROJECT_NAME} STATIC ${SOURCES} )

TARGET_LINK_LIBRARIES(	${PROJECT_NAME} 
						${KINECT_SDK_LIBS_PATH}/Kinect10.lib 
						${FT_SDK_LIBS_PATH}/FaceTrackLib.lib )
						





 